package by.bsu.rfe.belianko.euniversity.model;

import java.io.Serializable;

/**
 * Faculty bean.
 * 
 * @author Vitali_Belianko
 * 
 */
public class Faculty implements Serializable {
	private static final long serialVersionUID = 1L;
	private long facultyId;
	private String facultyName;
	private int plan;
	private int submitted;
	private String description;

	public long getFacultyId() {
		return facultyId;
	}

	public int getPlan() {
		return plan;
	}

	public void setPlan(int plan) {
		this.plan = plan;
	}

	public int getSubmitted() {
		return submitted;
	}

	public void setSubmitted(int submitted) {
		this.submitted = submitted;
	}

	public void setFacultyId(long facultyId) {
		this.facultyId = facultyId;
	}

	public String getFacultyName() {
		return facultyName;
	}

	public void setFacultyName(String facultyName) {
		this.facultyName = facultyName;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		result = prime * result + (int) (facultyId ^ (facultyId >>> 32));
		result = prime * result
				+ ((facultyName == null) ? 0 : facultyName.hashCode());
		result = prime * result + plan;
		result = prime * result + submitted;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (!(obj instanceof Faculty))
			return false;
		Faculty other = (Faculty) obj;
		if (description == null) {
			if (other.description != null)
				return false;
		} else if (!description.equals(other.description))
			return false;
		if (facultyId != other.facultyId)
			return false;
		if (facultyName == null) {
			if (other.facultyName != null)
				return false;
		} else if (!facultyName.equals(other.facultyName))
			return false;
		if (plan != other.plan)
			return false;
		if (submitted != other.submitted)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Faculty [facultyId=" + facultyId + ", facultyName="
				+ facultyName + ", plan=" + plan + ", submitted=" + submitted
				+ ", description=" + description + "]";
	}

}
